export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "searchMenuSpan": 24,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn:true,
  // menu: false,
  menuWidth: 80,
  labelWidth: 120,
  search: {
    labelWidth: 150,  // 设置 search 部分的 label 宽度
  },
  "column": [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
   /*   formatter:(val) => {
        val.docNo = val.pathName.split('\\').pop();
        return val.pathName.split('\\').pop();
      },*/
      search: true,
    },
    {
      "type": "input",
      "label": "SN",
      "prop": "sn",
      "span": 12,
      width: 150,
      search: true
    },
	  {
      "type": "input",
      "label": "连接头编号",
      "prop": "no",
      "span": 12,
      width: 100,
    },
	  {
      "type": "input",
      "label": "插损_1310",
      "prop": "il1",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "插损_1550",
      "prop": "il2",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "回损_1310",
      "prop": "rl1",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "回损_1550",
      "prop": "rl2",
      "span": 12,
      width: 80,
    },
    {
      "type": "input",
      "label": "设备编号",
      "prop": "deviceSn",
      "span": 12,
      search: true,
    },
	  /*{
      "type": "input",
      "label": "Status",
      "prop": "result",
      "span": 12,
      search: true,
      width: 100,
      html:true,
      formatter:(val) => {
        if(val.result==='Pass'){
          return '<b style="color:green">'+val.result+'<b/>'
        }else {
          return '<b style="color:red">'+val.result+'<b/>'
        }
      }
    },*/
	  {
      "type": "input",
      "label": "测量任务",
      "prop": "type",
      "span": 12,
      hide: true,
      display: false
    },
	  /*{
      "type": "input",
      "label": "目录名",
      "prop": "pathName",
      "span": 12,
      hide: false
    },
	  {
      "type": "input",
      "label": "文件名",
      "prop": "fileName",
      "span": 12,
      hide: false
    },*/
    {
      label: '时间',
      prop: 'time',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      search: true,
      searchType:"datetimerange",
      startPlaceholder: '日期开始范围自定义',
      endPlaceholder: '日期结束范围自定义',
      width: 150,
    },
  ]
}

export const tableSummaryOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "searchMenuSpan": 6,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn:true,
  // menu: false,
  menuWidth: 80,
  labelWidth: 120,
  search: {
    labelWidth: 150,  // 设置 search 部分的 label 宽度
  },
  menu: false,
  refreshBtn:false,
  columnBtn:false,
  height: '40vh',
  "column": [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
      // formatter:(val) => {
      //   return val.pathName.split('\\').pop();
      // },
      overHidden:true,
    },
    {
      "type": "input",
      "label": "车间",
      "prop": "workshopName",
      "span": 12,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "产线",
      "prop": "realityLineName",
      "span": 12,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "品号",
      "prop": "itemCode",
      "span": 12,
      overHidden:true,
    },
    {  label: '插回损工位',
      children: [
        {
          "type": "input",
          "label": "设备编号",
          "prop": "deviceSn",
          "span": 12,
          overHidden:true,
        },
    {
      "type": "input",
      "label": "SN",
      "prop": "sn",
      "span": 12,
      width: 150,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "连接头编号",
      "prop": "no",
      "span": 12,
      width: 100,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "插损_1310",
      "prop": "il1",
      "span": 12,
      width: 80,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "插损_1550",
      "prop": "il2",
      "span": 12,
      width: 80,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "回损_1310",
      "prop": "rl1",
      "span": 12,
      width: 80,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "回损_1550",
      "prop": "rl2",
      "span": 12,
      width: 80,
      overHidden:true,
    },
    /*{
      "type": "input",
      "label": "Status",
      "prop": "result",
      "span": 12,
      search: true,
      width: 100,
      html:true,
      formatter:(val) => {
        if(val.result==='Pass'){
          return '<b style="color:green">'+val.result+'<b/>'
        }else {
          return '<b style="color:red">'+val.result+'<b/>'
        }
      }
    },*/
    {
      "type": "input",
      "label": "测量任务",
      "prop": "type",
      "span": 12,
      hide: true
    },
    /*{
      "type": "input",
      "label": "目录名",
      "prop": "pathName",
      "span": 12,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "文件名",
      "prop": "fileName",
      "span": 12,
      overHidden:true,
    },*/
    {
      label: '时间',
      prop: 'time',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      width: 150,
      overHidden:true,
    },
        ]}
  ]
}
export const tableSummaryAloneOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "searchMenuSpan": 6,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn:true,
  // menu: false,
  menuWidth: 80,
  labelWidth: 120,
  search: {
    labelWidth: 150,  // 设置 search 部分的 label 宽度
  },
  menu: false,
  refreshBtn:false,
  columnBtn:false,
  "column": [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
      width: 120,
      // formatter:(val) => {
      //   return val.pathName.split('\\').pop();
      // },
      overHidden:true,
    },
    {
      "type": "input",
      "label": "车间",
      "prop": "workshopName",
      "span": 12,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "产线",
      "prop": "realityLineName",
      "span": 12,
      overHidden:true,
    },
    {
      "type": "input",
      "label": "品号",
      "prop": "itemCode",
      "span": 12,
      overHidden:true,
    },
    {  label: '插回损工位',
      children: [
        {
          "type": "input",
          "label": "设备编号",
          "prop": "deviceSn",
          "span": 12,
          width: 100,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "SN",
          "prop": "sn",
          "span": 12,
          width: 180,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "连接头编号",
          "prop": "no",
          "span": 12,
          width: 100,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "插损_1310",
          "prop": "il1",
          "span": 12,
          width: 80,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "插损_1550",
          "prop": "il2",
          "span": 12,
          width: 80,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "回损_1310",
          "prop": "rl1",
          "span": 12,
          width: 80,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "回损_1550",
          "prop": "rl2",
          "span": 12,
          width: 80,
          overHidden:true,
        },
        /*{
          "type": "input",
          "label": "Status",
          "prop": "result",
          "span": 12,
          search: true,
          width: 100,
          html:true,
          formatter:(val) => {
            if(val.result==='Pass'){
              return '<b style="color:green">'+val.result+'<b/>'
            }else {
              return '<b style="color:red">'+val.result+'<b/>'
            }
          }
        },*/
        {
          "type": "input",
          "label": "测量任务",
          "prop": "type",
          "span": 12,
          hide: true
        },
        /*{
          "type": "input",
          "label": "目录名",
          "prop": "pathName",
          "span": 12,
          overHidden:true,
        },
        {
          "type": "input",
          "label": "文件名",
          "prop": "fileName",
          "span": 12,
          overHidden:true,
        },*/
        {
          label: '时间',
          prop: 'time',
          type: 'datetime',
          format: 'yyyy-MM-dd HH:mm:ss',
          valueFormat: 'yyyy-MM-dd HH:mm:ss',
          width: 150,
          overHidden:true,
        },
      ]}
  ]
}
